/*
 * Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved.
 *
 * https://www.mall4j.com/
 *
 * 未经允许，不可做商业用途！
 *
 * 版权所有，侵权必究！
 */
package com.yami.shop.distribution.common.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yami.shop.bean.model.Product;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author yami
 */
@Data
@TableName( "tz_distribution_prod")
public class DistributionProd {

    @TableId
    @ApiModelProperty("分销商品表id")
    private Long distributionProdId;

    @ApiModelProperty("店铺id")
    private Long shopId;

    @ApiModelProperty("商品id")
    private Long prodId;

    @ApiModelProperty("奖励id")
    private Long awardId;

    @ApiModelProperty("状态(0:商家下架 1:商家上架 2:违规下架 3:平台审核)")
    private Integer state;

    @ApiModelProperty("修改时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @ApiModelProperty("操作人id")
    private Long modifier;

    @ApiModelProperty("是否使用默认奖励(0 不使用 1使用)")
    private Integer defaultReward;

    @ApiModelProperty("关联商品")
    @TableField(exist = false)
    private Product product;

    @ApiModelProperty("奖励比例(0 按比例 1 按固定数值)")
    private Integer awardProportion;

    @ApiModelProperty("奖励数额设置(0 固定奖励,1 根据等级奖励)")
    private Integer awardNumberSet;

    @ApiModelProperty("奖励数额(json)")
    private String awardNumbers;

    @ApiModelProperty("上级奖励数额(json)")
    private String parentAwardNumbers;

    @ApiModelProperty("上级奖励设置(0 关闭 1开启)")
    private Integer parentAwardSet;
}
